#ifndef PLUGININTERFACE_H
#define PLUGININTERFACE_H

#include <QList>
#include <QtCore/QtGlobal>

#if defined(PLUGININTERFACE_LIBRARY)
#define PLUGININTERFACE_EXPORT Q_DECL_EXPORT
#else
#define PLUGININTERFACE_EXPORT Q_DECL_IMPORT
#endif

#include "PluginMessage.h"

class PLUGININTERFACE_EXPORT PluginInterface {
public:
  virtual QWidget *widget() = 0;
  virtual void sendMessage(PluginMessage) = 0;
  virtual void receiveMessage(PluginMessage) = 0;
  virtual PluginMessage handleMessage(PluginMessage) = 0;
};

using PluginInterfaceList = QList<PluginInterface *>;

#define PluginInterface_iid "com.zmgrobot.Plugins.PluginInterface"

Q_DECLARE_INTERFACE(PluginInterface, PluginInterface_iid)

#endif
